"""
2 4 1 5 3

2 4 1 5 3
2 1 4 5 3
2 1 4 5 3
2 1 4 3 5

1 2 4 3 5
1 2 4 3 5
1 2 3 4 5

1 2 3 4 5
1 2 3 4 5

1 2 3 4 5
"""

a = [2, 4, 1, 5, 3]
for j in range(len(a)-1):
    for i in range(len(a) - 1 - j):
        if a[i] > a[i + 1]:
            a[i], a[i + 1] = a[i + 1], a[i]

print(a)


